package com.yoofn.framework.fragment

import android.databinding.ViewDataBinding

/**
 * Created by kalshen on 17-9-4.
 * @描述 viewpager 显示的 fragment
 */
abstract class  ViewPagerFragment(val isLazyLoad:Boolean=false) : BaseFragment<ViewDataBinding>(){

    override fun setUserVisibleHint(isVisibleToUser: Boolean) {
        super.setUserVisibleHint(isVisibleToUser)
        if (isLazyLoad && isVisibleToUser) {    //判断用户是否要懒加载并且界面是否可见
            addRequest(*netData)     //访问网络加载数据
        }
    }


}